package com.yu;

import com.yu.Hello;
import com.yu.HelloService;
import com.yu.annotation.RpcService;
import lombok.extern.slf4j.Slf4j;

/**
 * @PackageName: com.yu
 * @Description:
 * @Version: v1.0.0
 * @Author: yuweilin
 * @Date: 14:28
 * <p>
 * Modification History:
 * Date         Author          Version            Description
 * ------------------------------------------------------------
 * 2021/2/5      yuweilin         v1.0.0               新建
 */
@Slf4j
@RpcService(group = "test1", version = "version1")
public class HelloServiceImpl implements HelloService {

    static {
        System.out.println("HelloServiceImpl被创建");
    }

    @Override
    public String hello(Hello hello) {
        log.info("HelloServiceImpl收到: {}.", hello.getMessage());
        String result = "Hello description is " + hello.getDescription();
        log.info("HelloServiceImpl返回: {}.", result);
        return result;
    }
}
